#include <iostream>
#include <unistd.h>
#include "Task.hpp"
#include "ThreadPool.hpp"


int main()
{
    ThreadPool<Task> * t = new ThreadPool<Task>();
    t->Init();
    t->Start();
    int cnt = 10;
    while(cnt--)
    {
        Task ta(1,1);
        t->Push(ta);

        sleep(1);
        std::cout<<"cnt: "<<cnt<<std::endl;
    }

    t->Stop();
    std::cout<<"thread pool stop!"<<std::endl;

    sleep(10);

    return 0;
}